package homework.api.day08._cp;

public class ThrowDemo {
    public static void main(String[] args) {
        try{
            Student s = new Student();
            s.setAge(1000);
            System.out.println("此人年龄是"+s.getAge()+"岁");
        }catch (Exception e){
            System.out.println("年龄不合法");
        }

    }
}
